import asyncio

from services.server_integration.api import ServerIntegrationApi, Alarm
from services.automatic_control.api import AutomaticControlApi


async def main():
    loop = asyncio.get_event_loop()

    SI_API = ServerIntegrationApi()
    await SI_API.raise_alarm('TxService3LoopOverAttenuation', True, value=-1.0)
    await SI_API.raise_alarm('TxService3LoopOverAttenuation', True, value=-1.0)
    await SI_API.raise_alarm('TxService3LoopOverAttenuation', True, value=-1.0)
    await SI_API.raise_alarm('TxService3LoopOverAttenuation', False, value=1.0)


asyncio.run(main())

# ac = AutomaticControlApi()
# ac.set_output_power_correct_number(5, 57)
# ac.set_additional_output_power_correct_number(5, 0)
# ac.set_output_power_correct_number(2, 57)
# ac.set_additional_output_power_correct_number(2, 0)
# ac.set_output_power_correct_number(3, 57)
# ac.set_additional_output_power_correct_number(3, 0)
# ac.set_output_power_correct_number(4, 57)
# ac.set_additional_output_power_correct_number(4, 0)